package org.smartercontext.contextmger.json.reader;

import java.io.IOException;
import java.io.Reader;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * 
 * @author JuanPablo
 * @version 1.0
 * @creation_date 09 Mar 2014
 * Public interface for read items in JSON File
 */
public interface IJSONReader {

	/**
	 * 
	 * @param url
	 * @return JSONObject
	 * @throws IOException
	 * @throws JSONException
	 * This method allows extract JSON objects from a URL
	 */
	public JSONObject readJSONfromURL(String url) throws IOException, JSONException;
	
	/**
	 * 
	 * @param reader
	 * @return String
	 * @throws IOException
	 * This method allows convert a JSON element in a String data type
	 */
    public String convertJSONtoText(Reader reader) throws IOException;
}
